#pragma once
#include <windows.h>
#define FRAME_WIDTH 120
#define STR_APP_NAME "WndFrame"
#define WINDOW_CAPTION "RTS AI"
#define STR_TOOLBOX_NAME "WndFloater"


#define ID_MYBUTTON1 1
#define ID_MYBUTTON2 2
#define ID_MYBUTTON3 3
#define ID_MYBUTTON4 4
#define ID_MYBUTTON5 5
#define ID_MYBUTTON6 6
#define ID_MYBUTTON7 7
#define ID_MYBUTTON8 8
#define ID_MYBUTTON9 9
#define ID_MYBUTTON10 10

class cMain;
class cWindow
{
cMain & Main;
private:
	bool StartDebug;
	
	HWND hwndStatic0;
	HWND hwndStatic1;
	HWND hwndStatic2;
	HWND hwndStatic3;
	HWND hwndStatic4;
	HWND hwndStatic5;

	HWND hwndStatic6;
	HWND hwndStatic7;
	HWND hwndStatic8;
	HWND hwndStatic9;
	HWND hwndStatic10;

	HWND hwndStatic11;
	HWND hwndStatic12;
	HWND hwndStatic13;
	HWND hwndStatic14;

	int CursorPosX;

	int CursorPosY;
public:
	void SetStartDebug(bool ValToSet){ StartDebug = ValToSet; }
	bool GetStartDebug(){ return StartDebug; }
	int GetCursorPosX(){ return CursorPosX; }
	int GetCursorPosY(){ return CursorPosY; }

	void SetCursorPosX(int CursorPosX){ this->CursorPosX = CursorPosX; }
	void SetCursorPosY(int CursorPosY){  this->CursorPosY = CursorPosY; }
	HWND hwndButton3;
	HWND hwndButton4;
	HWND hwndButton5;
	HWND hwndButton6;

	HWND hwndButton7;
	HWND hwndButton8;
	HWND hwndButton9;
	HWND hwndButton10;
	static HWND   hWndMainFrame;
	HWND GetMainFrameHWND() { return  hWndMainFrame; }
	static HWND   hWndToolbox;
	HWND GetToolBoxHWND() { return  hWndToolbox; }
//char text2[255];
	int ScreenWidth;
	int ScreenHeight;
	int ScreenSizeWidth;
	int ScreenSizeHeight;

	unsigned int ToolWindowStartPosX;
	unsigned int ToolWindowStartPosY;
	unsigned int ToolWindowEndPosX;
	unsigned int ToolWindowEndPosY;
	unsigned int ToolWindowClientAreaStartPosX; // 132
	unsigned int GetToolWindowClientAreaStartPosX() { return ToolWindowClientAreaStartPosX; }
	unsigned int GetToolWindowClientAreaStartPosY() { return ToolWindowClientAreaStartPosY; }
	unsigned int ToolWindowClientAreaStartPosY; // 110
	unsigned int ToolWindowClientAreaEndPosX;  // 1148 - 1
	unsigned int GetWindowClientAreaEndPosX() { return ToolWindowClientAreaEndPosX; }
	unsigned int GetWindowClientAreaEndPosY() { return ToolWindowClientAreaEndPosY; }
	unsigned int ToolWindowClientAreaEndPosY;  // 716-1
	unsigned int GetToolWindowClientAreaEndPosX() { return ToolWindowClientAreaEndPosX; }
	unsigned int GetToolWindowClientAreaEndPosY() { return ToolWindowClientAreaEndPosY; }
	unsigned int ToolClientAreaSizeWidth;
	unsigned int ToolClientAreaSizeHeight;
	unsigned int GetToolClientAreaSizeWidth() { return ToolClientAreaSizeWidth; }
	unsigned int GetToolClientAreaSizeHeight() { return ToolClientAreaSizeHeight; }

	unsigned int WindowStartPosX;
	unsigned int GetWindowStartPosX() { return ToolWindowStartPosX; }
	unsigned int GetWindowStartPosY() { return ToolWindowStartPosY; }
	unsigned int WindowStartPosY;
	unsigned int WindowEndPosX;
	unsigned int WindowEndPosY;

	unsigned int WindowClientAreaStartPosX; // 132
	unsigned int GetWindowClientAreaStartPosX() { return WindowClientAreaStartPosX; }
	unsigned int WindowClientAreaStartPosY; // 110
	unsigned int GetWindowClientAreaStartPosY() { return WindowClientAreaStartPosY; }
	unsigned int WindowClientAreaEndPosX;  // 1148 - 1
	unsigned int WindowClientAreaEndPosY;  // 716-1
	unsigned int ClientAreaSizeWidth;
	unsigned int GetClientAreaSizeWidth() { return ClientAreaSizeWidth; }
	unsigned int ClientAreaSizeHeight;
	unsigned int GetClientAreaSizeHeight() { return ClientAreaSizeHeight; }
	void SetStatic1Text(char * TextToSet);
	
	void SetCurrentTileFText(int ValToSet);
	void SetCurrentTileGText(int ValToSet);
	void SetCurrentTileHText(int ValToSet);
	void SetCurrentTilePosXYText(int X, int Y);

	void SetNTileFText(int ValToSet);
	void SetNTileGText(int ValToSet);
	void SetNTileHText(int ValToSet);
	void SetNTilePosXYText(int X, int Y);

	void SetOTileFText(int ValToSet);
	void SetOTileGText(int ValToSet);
	void SetOTileHText(int ValToSet);
	void SetDistToTile(int ValToSet);
	void SetPathLengh(int ValToSet);

	unsigned int WindowCenterPosX;
	unsigned int WindowCenterPosY;
	static bool initialized;
	cWindow(cMain & Main);
	~cWindow();
	void CalculateDimensions();
	//static HWND GetMainFrameHwnd(){ return hWndMainFrame; }
	//static HWND GetToolBoxHwnd(){ return hWndMainFrame; }
	//bool GetToolBoxVisible(){ return ToolBoxVisible; }
	//void SetToolBoxVisible(bool visible){ ToolBoxVisible = visible; }
private:
	HINSTANCE hInst;
	//bool ToolBoxVisible;
};